<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="/gymjsp/common/head.jsp" %>
<div class="right">
    <div class="location">
        <strong>你现在所在的位置是:</strong>
        <span>人事管理 >> 员工信息页面</span>
    </div>
    <div class="search">
        <form id="" method="get" action="${pageContext.request.contextPath }/gymjsp/personnel.do">
            <input name="method" value="query" class="input-text" type="hidden">
            <span>用户名：</span>
            <input name="queryName" class="input-text" type="text" value="${name }">
            <input type="hidden" name="pageIndex" value="1"/>
            <input type="hidden" name="pageSize" value="${pageSize}">
            <input value="查 询" type="submit" id="searchbutton">
            <a href="${pageContext.request.contextPath}/gymjsp/personnel/staffadd.jsp">添加员工</a>
            <a class="deleteUser" href="javascript:;">批量删除</a>
        </form>
    </div>
    <!--管理员-->
    <table class="providerTable" id="providerTable" cellpadding="0" cellspacing="0">
        <tr class="firstTr">
            <th width="10%">员工id</th>
            <th width="10%">员工姓名</th>
            <th width="10%">员工性别</th>
            <th width="5%">员工年龄</th>
            <th width="20%">员工手机号</th>
            <th width="20%">员工住址</th>
            <th width="10%">员工职位</th>
            <th width="10%">操作</th>
        </tr>
        <c:forEach var="personnel" items="${personnel}" varStatus="status">
            <tr>
                <td>
                    <input type="checkbox"  class="${personnel.name}" name="personnelIds" value="${personnel.id}">
                </td>
                <td>
                    <span>${personnel.name}</span>
                </td>
                <td>
                    <span>${personnel.gender}</span>
                </td>
                <td>
                    <span>${personnel.age }</span>
                </td>
                <td>
                    <span>${personnel.phone}</span>
                </td>
                <td>
                    <span>${personnel.address }</span>
                </td>
                <td>
                    <span>${personnel.position}</span>
                </td>
                <td>
                    <span><a class="viewUser" href="javascript:;" personnelid=${personnel.id } username=${personnel.name }><img
                            src="${pageContext.request.contextPath }/static/images/read.png" alt="查看" title="查看"/></a></span>
                    <span><a class="modifyUser" href="javascript:;" personnelid=${personnel.id } username=${personnel.name }><img
                            src="${pageContext.request.contextPath }/static/images/xiugai.png" alt="修改" title="修改"/></a></span>
                    <span><a class="deleteUser" href="javascript:;" personnelid=${personnel.id } username=${personnel.name }><img
                            src="${pageContext.request.contextPath }/static/images/schu.png" alt="删除" title="删除"/></a></span>
                </td>
            </tr>
        </c:forEach>
    </table>
    <input type="hidden" id="totalPageCount" value="${totalPageCount}"/>
    <c:import url="/gymjsp/rollpage.jsp">
        <c:param name="pageSize" value="${pageSize}"/>
        <c:param name="totalCount" value="${totalCount}"/>
        <c:param name="currentPageNo" value="${currentPageNo}"/>
        <c:param name="totalPageCount" value="${totalPageCount}"/>
    </c:import>
</div>
</section>

<!--点击删除按钮后弹出的页面-->
<div class="zhezhao"></div>
<div class="remove" id="removeUse">
    <div class="removerChid">
        <h2>提示</h2>
        <div class="removeMain">
            <p>你确定要删除该用户吗？</p>
            <a href="#" id="yes">确定</a>
            <a href="#" id="no">取消</a>
        </div>
    </div>
</div>

<%@include file="/gymjsp/common/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/staff.js"></script>
<script type="application/javascript">
    console.log("${pageContext.request.contextPath}")
</script>
